{template Public:Page:header}

<div class="container">
    
<div class="row">
     
    <div class="row">
      <div class="col-lg-9">
        <div class="well" style="background:#FFF">
        
        
        <div class="row">
              <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="wizard wizard-wired">
                  <ul class="steps">
                   <li class="complete" data-target="#wiredstep2"><span class="step">1</span><span class="title">填写需求信息</span> <span class="chevron"></span></li>
                    <li class="active" data-target="#wiredstep3"><span class="step">2</span><span class="title">设置赏金</span> <span class="chevron"></span></li>
                    <li data-target="#wiredstep4"><span class="step">3</span><span class="title">确认并托管</span> <span class="chevron"></span></li>
                  </ul>
                </div>
              </div>
        </div>
    
    
       
    
        			{template Task:Publish:setmoneyform}
    
           
                 
                    <div class="row">
                
                            <div class="col-lg-12"> <a class="btn btn-default shiny" href="{echo U('/task/publish/index/id/'.$id)}">上一步</a> &nbsp;
                              <button class="btn btn-success" type="submit" id="SubmitMoney">下一步</button>
                            </div>
                             </div>
                
                   


        </div>
      </div>
      <div class="col-lg-3">
        <div class="well" style="background:#FFF">
  
          <h3 class="text-success">联系客服帮您发需求</h3>
          <h4>客服电话 400-000-000 </h4>
          <p class="label label-default">周一至周日9:00-23:00</p>
          <p>联系在线客服</p>
          <p class="label label-default">周一至周五9:00-18:00</p>
   
        </div>
      </div>
    </div>

</div>
</div>




<!--Page Related Scripts-->
<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<script>

        $(document).ready(function () {

		  $('#SubmitMoney').click(function(){
				$.post('{echo U("/post/task/publishmoney/id/".$id)}',$("#TaskForm").serialize()+'&top='+$('#TaskTop').is(':checked')+'&robots='+$('#TaskRobots').is(':checked')+'&hidetask='+$('#HideTask').is(':checked')+'&hidedraft='+$('#HideDraft').is(':checked')+'&promise='+$('#Promise').is(':checked'), function(json) {
					  	$('.bootbox').PhpappProgress({json:json});

				 		return true;
					
				  }, 'json');
				  

				 bootbox.dialog({
					 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
					 title: '<i class="icon fa fa-retweet"></i> 提交中',
					 closeButton: false
				 }).PhpappProgress({time:1000});
		
			 
				  return false; 
		  });
		  
 		  $('#TaskForm').bootstrapValidator({
                excluded: [':disabled'],
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
				/*
                submitHandler: function (form) {
				 //console.log('ok');
                },
				*/
                fields: {
	
				 money:{
					 validators: {
						 notEmpty: {
						    message: '<i class="fa fa-frown-o"></i> 对不起！请输入赏金！'
						},
						 
						   regexp: {
							    regexp: /^[0-9.]+$/,
							    message: "<i class='fa fa-frown-o'></i> 对不起，您输入的赏金格式有误！"
							},
							

						 callback: {
						    message: '<i class="fa fa-frown-o"></i> 对不起！赏金不能小于0.1元！',
						    callback: function(value) {
							    //console.log($(".progress-bar").html());
							    if(parseFloat(value) <0.1){
								     return false; 
							    }
							    
							     return parseFloat(value);
						    }
						}
					 }
				}
			
				
			 }
			
            }) 

        });
	   


    </script>
    
    
{template Public:Page:footer}